package com.yds.ydsdatasetbackend.model.dto.file.predict.common;

import com.yds.ydsdatasetbackend.exception.ErrorCode;
import lombok.Data;

import java.io.Serializable;

@Data
public class PredictResult implements Serializable {
    private int code;

    private Integer data;

    private String message;

    public PredictResult(int code, Integer data, String message) {
        this.code = code;
        this.data = data;
        this.message = message;
    }

    public PredictResult(int code, Integer data) {
        this(code, data, "");
    }

    public PredictResult(ErrorCode errorCode) {
        this(errorCode.getCode(), null, errorCode.getMessage());
    }
}
